<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <link rel="stylesheet" href="./lib/bootstrap/css/bootstrap.css">

</head>

<body>

  <button class="hero-btn">点我</button>



  <!-- 模态框 -->
  <div class="modal fade" id="myModal123" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
      <div class="modal-content">
        <div class="modal-header">
          <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
              aria-hidden="true">&times;</span></button>
          <h4 class="modal-title" id="myModalLabel">Modal title</h4>
        </div>
        <div class="modal-body">
          <button class="hero-close">关闭</button>
        </div>
        <div class="modal-footer">
          <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
          <button type="button" class="btn btn-primary">Save changes</button>
        </div>
      </div>
    </div>
  </div>


  <script src="./js/jquery.js"></script>
  <script src="./lib/bootstrap/js/bootstrap.js"></script>
  <script>
    $(".hero-btn").click(function () {
      //  js代码的方式 来显示 模态框！！！ 
      // xxxxxxx show();
      $('#myModal123').modal('show')
    })

    $(".hero-close").click(function () {
      // js代码的放出 来隐藏模态框
      $('#myModal123').modal('hide')// hide  close
    })

  </script>
</body>

</html>